package com.zhongyu.AreaJson.util;

import org.apache.commons.lang3.StringUtils;

/**
 * @Auther: zhongyu
 * @Date: 2018/9/11 08:12
 * @Description:
 */
public class StringUtil {

    /**
     * 获取机构类编码
     *
     * @param orgCode
     * @return
     */
    public static String parseLikeOrgCode(String orgCode) {
        String result = null;
        if (!StringUtils.isEmpty(orgCode)) {
            while (orgCode.endsWith("00")) {
                orgCode = orgCode.substring(0, orgCode.lastIndexOf("00"));
            }
            result = orgCode;
        }
        return result;
    }
}
